<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <Style x:Key="MaterialDesignScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="OverridesDefaultStyle" Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid Background="{TemplateBinding Background}">
              <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <ScrollBar
                  x:Name="PART_VerticalScrollBar"
                  Grid.Column="1"
                  Minimum="0.0"
                  Maximum="{TemplateBinding ScrollableHeight}"
                  ViewportSize="{TemplateBinding ViewportHeight}"
                  Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=VerticalOffset, Mode=OneWay}"
                  Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                  Cursor="Arrow"
                  AutomationProperties.AutomationId="VerticalScrollBar"/>
              <ScrollBar
                  x:Name="PART_HorizontalScrollBar"
                  Orientation="Horizontal"
                  Grid.Row="1"
                  Minimum="0.0"
                  Maximum="{TemplateBinding ScrollableWidth}"
                  ViewportSize="{TemplateBinding ViewportWidth}"
                  Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HorizontalOffset, Mode=OneWay}"
                  Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                  Cursor="Arrow"
                  AutomationProperties.AutomationId="HorizontalScrollBar"/>
              <ScrollContentPresenter
                  x:Name="PART_ScrollContentPresenter"
                  Margin="{TemplateBinding Padding}"
                  Content="{TemplateBinding Content}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  CanContentScroll="{TemplateBinding CanContentScroll}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="{x:Type ScrollViewer}" BasedOn="{StaticResource MaterialDesignScrollViewer}" TargetType="{x:Type ScrollViewer}" />

</ResourceDictionary>
